<template>
  <!-- 面板的复用，面板=头部+商品 这一块是头部区域的复用 -->
  <div class="home-pannel">
    <div class="container">
      <div class="head">
        <h3>
          {{ title }} <small>{{ subTitle }}</small>
        </h3>
        <slot name="right"></slot>
      </div>
      <!-- 内容插槽（默认插槽） -->
      <slot></slot>
    </div>
  </div>
</template>

<script>
export default {
  name: 'HomePannel',
  props: {
    title: {
      type: String,
      default: ''
    },
    subTitle: {
      type: String,
      default: ''
    }
  },
  setup(props) {
    return {}
  }
}
</script>

<style lang="less" scoped>
.home-pannel {
  background-color: #fff;
  .head {
    padding: 40px 0;
    display: flex;
    align-items: flex-end;
    h3 {
      flex: 1;
      font-size: 32px;
      font-weight: normal;
      height: 35px;
      line-height: 35px;
      small {
        font-size: 16px;
        color: #999;
        margin-left: 20px;
      }
    }
  }
}
</style>
